<!DOCTYPE html>
<html>
<head>
    <meta charset='UTF-8'>
    <title>Document</title>
</head>
<body>
<div id="rw">
    <button v-on:keydown.enter='submit'>回车</button>
    <p v-on:keydown.pageup='jia'>
        {{ num }}
    </p>
</div>
</body>
<script src="../vue.js"></script>
<script>
new Vue({
    el:"#rw",
    data:{
        num:5
    },
    methods:{
        submit: function(){
            alert('你刚刚按下了回车键~')
        },
        jia: function(){
            this.num +=1
        }
    }
})
</script>
</html>